package org.fungene.util.chart;

public final class ChartConstant {
	public static final int CMD_BAR = 1;
	public static final int CMD_LINE = 2;
	
	public static final String TYPE_BAR = "BAR";
	public static final String TYPE_LINE = "LINE";
	
	public static final int PIXEL_X = 1600;
	public static final int PIXEL_Y = 550;

	public static String CMDToType(int cmd) {
		switch (cmd) {
		case CMD_BAR:
			return TYPE_BAR;
		case CMD_LINE:
			return TYPE_LINE;
		}
		return TYPE_BAR;
	}

	public static int TypeToCMD(String Type) {
		if (Type.equals(TYPE_BAR))
			return CMD_BAR;
		if (Type.equals(TYPE_LINE))
			return CMD_LINE;
		
		return CMD_BAR;
	}

}
